package isvb.impl.api;

import isvb.impl.model.PromotionResultIsvB;
import org.dormi.learn.promotion.api.PromotionService;
import org.dormi.learn.promotion.model.Order;
import org.dormi.learn.promotion.model.Promotion;
import org.dormi.learn.promotion.model.PromotionResult;

import java.math.BigDecimal;
import java.util.List;

/**
 * add description here
 *
 * @author : dormi330
 * @version : 1.0
 */
public class PromotionServiceIsvB implements PromotionService {

    @Override
    public PromotionResult apply(Order order, Promotion promotion, List<PromotionResult> pre) {

        PromotionResultIsvB result = new PromotionResultIsvB();
        //
        result.setPromotion(promotion);
        result.setOrder(order);
        result.setAppliedLines(null);
        //
        result.setFreeAmount(new BigDecimal("100"));
        result.setGiftLines(null);

        return result;
    }
}
